The present invention relates to a method and apparatus for controlling bus priority for use with a data processing system in which central processing units (CPUs) and terminal devices (TDs) are connected to a common bus, and more particularly, to the control of bus priority in a data processing system transmitting messages using a contention system.
FIG. 1 shows a data processing system of the type to which the present invention is applied. A plurality of central processing units (CPUs) 2 and a plurality of terminal devices 3, such as display devices or printers, are connected by node processors 4 to a transmission bus 1, but no specific bus control device is provided. Messages are transmitted and received between the units and the devices over the transmission bus 1. A system is frequently adopted in which, when a node processor 4 receives a transmission message from a central processing unit 2 or a terminal device 3, it checks whether the transmission bus 1 is busy, and then starts to transmit the message if no other node processor is using the transmission bus 1. This system is called a contention system, it has the disadvantage of the possibility of a conflict between data on the transmission bus as a result of the simultaneous start of transmission of messages from two or more node processors.
In response to this possible conflict on the transmission bus, a system has been developed in which a node processor that has detected a conflict inhibits transmission and sets a retransmission waiting time based on a predetermined algorithm using the number of conflicts as a parameter, so that it restarts transmitting the message at the end of the retransmission waiting time. A system has also been developed in which device addresses within transmission messages are compared when a conflict takes place, and the node processor having the transmission message with the device address of the highest priority is assigned the transmission right.
In the first-mentioned system, priority between transmission messages or between the corresponding devices is not taken into consideration, so that a transmission message between central processing units 2, which is to be retransmitted first, could possibly be transmitted after a transmission message between terminal devices, when transmission messages between central processing units 2 and between terminal devices 3 of FIG. 1, for example, conflict. Moreover, a message with a higher priority, such as a message addressed to a console display device or to a high-speed terminal device, could be retransmitted after a delay resulting from a conflict with a message addressed to a low-speed terminal device, such as a printer, thus raising a problem concerning the performance of the system.
On the other hand, the latter system has the defect that only the transmission message with the highest priority of all the messages assigned priorities by device address can be continuously transmitted as it is, but the device address itself cannot be changed with ease.